package com.deram.ctin.serv.enter.impl;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.enter.api.EnterRecruitApi;
import com.deram.ctin.serv.enter.entity.BaseUpdateInfo;
import com.deram.ctin.serv.enter.entity.EnterRecruit;
import com.deram.ctin.serv.enter.filter.EnterRecruitFilter;
import com.deram.ctin.serv.enter.service.EnterRecruitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: jtt
 * @Description:
 * @Date: 2017/9/12 15:20
 * @version: V1.0
 */
@RestController
public class EnterRecruitApiImpl implements EnterRecruitApi {

    @Autowired
    private EnterRecruitService enterRecruitService;

    @Override
    public List<EnterRecruit> list(@RequestBody EnterRecruitFilter filter) {
        return enterRecruitService.list(filter);
    }

    @Override
    public EnterRecruit save(@RequestBody EnterRecruit param) {
        return enterRecruitService.save(param);
    }

    @Override
    public void delete(Long id) {
        enterRecruitService.delete(id);
    }

    @Override
    public void saveList(@RequestBody BaseUpdateInfo<EnterRecruit> updateInfo) {
        enterRecruitService.saveList(updateInfo);
    }

    @Override
    public PageResult<EnterRecruit> search(@RequestBody EnterRecruitFilter filter, @RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize) {
        return enterRecruitService.search(filter, pageNo, pageSize);
    }

}
